<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    foo().then(function () {
        console.log(4);
    });

    async function foo() {
        console.log(1);
        console.log(2);
        await 1; // 函数执行在此处暂停
        console.log(3);
    }
</script>
</body>
</html>
